package com.hhkj.open.api.controller;

import com.hhkj.open.api.model.req.LoginReq;
import com.hhkj.open.api.service.biz.OpenApiStudentBizService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * OpenApiStudentController
 *
 * @author HHKJ-SERVER-ZJ
 * @since 2023/7/13 10:35
 */
@RestController
@RequestMapping("/open/api/student")
public class OpenApiStudentController extends BaseController
{
    @Autowired
    private OpenApiStudentBizService openApiStudentBizService;

    /** 登录接口 */
    @PostMapping("/login")
    public AjaxResult login(@Validated @RequestBody LoginReq req) {
        return AjaxResult.success(openApiStudentBizService.login(req));
    }
}
